<template>
  <el-dialog v-dialogDrag :visible.sync="dialog" width="970px" :close-on-click-modal="false" :before-close="reset">
    <span slot="title" class="dialog-title">{{imgsText}}</span>
    <div class="dialoginfo">
      <div style="display:flex;flex-wrap: wrap;">
        <el-image v-for="item in imgList" :key="item" style="width: 200px; height:200px;margin:0 10px 10px 10px;border-radius: 4px;" :src="item" :preview-src-list="imgList" :z-index="10000"></el-image>
        <video v-for="item in mp4List" :key="item" controls style="width: 200px; height:200px;margin:0 10px 10px 10px;border-radius: 4px;border: 1px solid #ccc;" :src="item"></video>
        <div v-for="item in fileList" :key="item" style="width: 200px; height:200px;margin:0 10px 10px 10px;border-radius: 4px;display:flex;align-items: center;justify-content: center;border: 1px solid #ccc;position: relative;">
          <img style="width: 100px; height:100px;cursor: pointer;" src="@/assets/word.png" @click="$wps(item,0)" />
          <a class="el-link" style="position: absolute;bottom:15px;right:15px;" :href="'/file/' +item" download>
            <i class="el-icon-download" style="font-size:20px;"></i>
          </a>
        </div>
      </div>
    </div>
    <span slot="footer" class="dialog-footer">
      <el-button class="bottom_all_two" @click="reset">取 消</el-button>
    </span>
  </el-dialog>
</template>

<script>
export default {
  props: {
    dialog: {
      type: Boolean,
      default: false
    },
    imgsText: {
      type: String,
      default: ''
    },
    fileList: {
      type: Array,
      default: new Array()
    },
    mp4List: {
      type: Array,
      default: new Array()
    },
    imgList: {
      type: Array,
      default: new Array()
    },
  },
  data() {
    return {

    }
  },
  methods: {
    reset() {
      this.$emit('reset', 'imgsDialog')
    }
  }
}
</script>
<style lang="scss" scoped>
.el-link {
  color: $bg_color;
}
.el-link:hover {
  color: $bg_color;
  opacity: 0.7;
}
</style>


